Skip to content

fix: Bump cargo-manifest version to be compatible with 2024 edition workspaces#30

Open
lyinch wants to merge 1 commit intoros2-rust:mainfrom
lyinch:fix/bump_manifest_dep_version
Open

fix: Bump cargo-manifest version to be compatible with 2024 edition workspaces#30
lyinch wants to merge 1 commit intoros2-rust:mainfrom
lyinch:fix/bump_manifest_dep_version

Conversation

@lyinch
Copy link
Contributor

@lyinch lyinch commented Dec 23, 2025

I have a cargo workspace in which I also want to use rclrs. I am using edition 2024 with resolver v3:

[workspace]
resolver = "3"

[workspace.package]
edition = "2024"

With the current version of cargo-ament-build, I am getting a parser error:

$ cargo ament-build -p rust_pubsub --install-base install 
Error in cargo-ament-build

Caused by:
    TOML parse error at line 2, column 12
      |
    2 | resolver = "3"
      |            ^^^
    unknown variant `3`, expected `1` or `2`

A potential workaround is to not specify the resolver in this file as it is implicitly defined in the version 2024. However, I still think that this tool should not break existing setups, so this is not a solution for me. cargo-manifest v0.18.0 added support for resolver = "3": https://github.com/LukeMathWalker/cargo-manifest/blob/master/CHANGELOG.md#v0180-2025-01-10, so the proper fix is to bump this dependency. As I am already bumping this dependency version, I opted to use the latest version rather than the lowest one that addresses this issue.

Note that I am aware of the failing CI check named Security audit / security_audit (push) on this dependency, but by sweeping the commits I couldn't find anything sus (e.g. new dependencies), and it seems to be a failing cargo-deny-action run based on this config.

This PR resolves the current issue and I can build now with the workspace:

$ ./src/experiments/cargo-ament-build/target/debug/cargo-ament-build --install-base install

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s

I didn't perform any other tests.

Caveat:
The current cargo-ament-build still doesn't support workspaces (and likely wasn't intended to?) so this PR only resolves one issue with them, but the steps following the cargo build are still failing:

Error in cargo-ament-build

Caused by:
    Cargo manifest has no package section.

This is out of scope.

Copy link
Contributor

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyinch thanks!

@maspe36
Copy link

maspe36 commented Jan 3, 2026

Do we need to be mindful of building with Rust 1.75? All of our CI builds with the latest stable, so 1.92.

I'm going to guess no because we're actually shipping a final binary to users via pip.

EDIT: Although I do see this PR which suggests we do care about building for 1.75 for now
#33

@lyinch
Copy link
Contributor Author

lyinch commented Jan 8, 2026

Do we need to be mindful of building with Rust 1.75? All of our CI builds with the latest stable, so 1.92.

I'm going to guess no because we're actually shipping a final binary to users via pip.

EDIT: Although I do see this PR which suggests we do care about building for 1.75 for now #33

How will this change affect support for 1.75? To me, it looks like we're now just able to parse newer manifests, but the old ones still work. I don't think that the dependency at the new version is incompatible with 1.75.

I can see that CI runs with:

info: latest update on 2025-12-11, rust version 1.92.0 (ded5c06cf 2025-12-08)

so to be sure we'd have to run it with 1.75.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants